<?php if (!defined('NOVA_RUN')) die('You can\'t access this file directly!'); ?><?php $this->load('header'); ?>
<div><b><a href="<?php echo make_admin_link('category', 'view', (Router::param(0) > 0) ? array(Router::param(0)) : array()); ?>">BACK</a></b></div>
<?php if ($this->error): ?><span style="color:red;"><?php echo $this->error; ?></span><?php endif; ?>
<form method="post">
Category name:<br />
<input type="text" name="name" value="<?php echo get_request('name', 'post'); ?>" /><br />
Category description:<br />
<input type="text" name="description" value="<?php echo get_request('description', 'post'); ?>" /><br />
Parent category:<br />
<input type="text" name="parent" value="<?php
	if (get_request('parent', 'post'))
		echo get_request('parent', 'post');
	elseif (is_numeric(Router::param(0)) && Router::param(0) >= 0)
		echo Router::param(0);
	else
		echo 0;
?>" /><br />
Category order:<br />
<input type="text" name="order" value="<?php echo get_request('order', 'post'); ?>" /><br />
<input type="hidden" name="secretKey" value="<?php echo Engine::secretKey(); ?>" />
<input type="hidden" name="add_category" value="1" />
<input type="submit" value="add" />
</form>
<?php $this->load('footer'); ?>